<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>可视化布局系统</title>
		<!-- Fav and touch icons -->
		<link rel="shortcut icon" href="img/favicon.png">
		<!-- layui -->
		<link href="layui/css/layui.css" rel="stylesheet">
		<script type="text/javascript" src="layui/layui.js"></script>

		<!-- Le styles -->
		<link href="css/bootstrap-combined.min.css" rel="stylesheet">
		<link href="css/layoutit.css" rel="stylesheet">
		<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
		<!--[if lt IE 9]>
		<script src="js/html5shiv.js"></script>
		<![endif]-->
		<!-- jquery -->
		<script type="text/javascript" src="js/jquery-2.0.0.min.js"></script>
		<!--[if lt IE 9]>
		<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
		<![endif]-->
		<script type="text/javascript" src="js/bootstrap.min.js"></script>
		<!-- 其他组件 -->
		<script type="text/javascript" src="js/jquery-ui.js"></script>
		<script type="text/javascript" src="js/jquery.ui.touch-punch.min.js"></script>
		<script type="text/javascript" src="js/jquery.htmlClean.js"></script>
		<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
		<script type="text/javascript" src="ckeditor/config.js"></script>
		<script type="text/javascript" src="js/scripts.js"></script>
		<!-- 自定义组件样式 -->
		<link href="base/base.css" rel="stylesheet">
		<!-- <script type="text/javascript" src="base/base.js"></script> -->
		<!-- 公共样式 -->
		<link href="css/public.css" rel="stylesheet">
	</head>

	<body style="min-height: 660px; cursor: auto;" class="edit">
		<div class="navbar navbar-inverse navbar-fixed-top">
			<div class="navbar-inner">
				<div class="container-fluid">
					<button data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar" type="button">
						<span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span>
					</button>
					<!-- <a class="brand" href="#"><img src="img/favicon.png"> 可视化布局<span class="label">BETA</span></a> -->
					<div class="dropdown brand" style="padding: 0;text-align: center;">
						<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1"
							data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
							选择框架
							<span class="caret"></span>
						</button>
						<ul class="dropdown-menu" aria-labelledby="dropdownMenu1" style="left: 12px;">
							<li><a href="#">bootstrap</a></li>
							<li><a href="#">layui</a></li>
						</ul>
					</div>
					<div class="nav-collapse collapse">
						<ul class="nav" id="menu-layoutit">
							<li class="divider-vertical"></li>
							<li>
								<div class="btn-group" data-toggle="buttons-radio">
									<button type="button" id="edit" class="layui-btn layui-btn-sm active">
										<span><i class="icon-edit icon-white"></i>编辑</span>
									</button>
									<button type="button" class="layui-btn layui-btn-sm" id="devpreview"><i
											class="icon-eye-close icon-white"></i>布局编辑</button>
									<button type="button" class="layui-btn layui-btn-sm" id="sourcepreview"><i
											class="icon-eye-open icon-white"></i>预览</button>
								</div>
								<div class="btn-group">
									<button type="button" class="btn btn-primary" data-target="#downloadModal"
										rel="/build/downloadModal" role="button" data-toggle="modal"><i
											class="icon-chevron-down icon-white"></i>下载</button>
									<button class="btn btn-primary" href="/share/index" role="button"
										data-toggle="modal" data-target="#shareModal"><i
											class="icon-share icon-white"></i>保存</button>
									<button class="btn btn-primary" href="#clear" id="clear"><i
											class="icon-trash icon-white"></i>清空</button>
								</div>
								<div class="btn-group">
									<button class="btn btn-primary" href="#undo" id="undo"><i
											class="icon-arrow-left icon-white"></i>撤销</button>
									<button class="btn btn-primary" href="#redo" id="redo"><i
											class="icon-arrow-right icon-white"></i>重做</button>
								</div>
							</li>
						</ul>
					</div>
				</div>
			</div>
		</div>
		<div class="container-fluid">
			<div class="row-fluid">
				<div class="">
					<div class="sidebar-nav">
						<!-- 自定义 -->
						<ul class="nav nav-list accordion-group">
							<li class="nav-header">
								<i class="icon-plus icon-white"></i>
								自定义样式
							</li>
							<li style="display: none;" class="boxes" id="elmBase">
								<div class="box box-element ui-draggable">
									<a href="#close" class="remove label label-important">
										<i class="icon-remove icon-white"></i>删除
									</a>
									<span class="drag label"><i class="icon-move"></i>拖动</span>
									<span class="configuration">
										<span class="base-scope">
											<span>宽高(px):</span>
											<input type="number" onblur="baseScope(this.value,this)" name="width"
												placeholder="宽px" value="140"
												oninput="value=value.replace(/[^\d]/g,'')">
											<input type="number" onblur="baseScope(this.value,this)" name="height"
												placeholder="高px" value="140"
												oninput="value=value.replace(/[^\d]/g,'')">
										</span>
										<span class="btn-group">
											<a class="btn btn-mini dropdown-toggle" data-toggle="dropdown" href="#">
												样式 <span class="caret"></span>
											</a>
											<ul class="dropdown-menu">
												<li class="active"><a href="#" rel="">默认</a></li>
												<li class=""><a href="#" rel="img-rounded">圆角</a></li>
												<li class=""><a href="#" rel="img-circle">圆圈</a></li>
											</ul>
										</span>
									</span>
									<div class="preview">图片</div>
									<div class="view">
										<div class="base-img" style=""></div>
									</div>
								</div>
							</li>
						</ul>
						<!-- 自定义end -->
					</div>
				</div>
				<script>
					$('body').delegate('.base-img', 'click', function() {
						console.log('asd');
					});
					//图片宽高
					function baseScope(val, obj) {
						var wh = $(obj).attr('name');
						var styles = $(obj).parents('.box-element').children('.view').children('.base-img');
						styles.css(wh, val);
					}
				</script>
				<!-- 标签内容 -->
				<!--/span-->
				<div style="min-height: 590px;" class="demo ui-sortable">

				</div>
				<!--/span-->
				<!-- 标签内容end -->

				<div id="download-layout">
					<div class="container-fluid">
					</div>
				</div>
			</div>
			<!--/row-->
		</div>

		<!--/.fluid-container-->
		<div class="modal hide fade" role="dialog" id="editorModal">
			<div class="modal-header"> <a class="close" data-dismiss="modal">×</a>
				<h3>编辑</h3>
			</div>
			<div class="modal-body">
				<p>
					<textarea id="contenteditor"></textarea>
				</p>
			</div>
			<div class="modal-footer"> <a id="savecontent" class="btn btn-primary" data-dismiss="modal">保存</a> <a
					class="btn" data-dismiss="modal">关闭</a> </div>
		</div>
		<div class="modal hide fade" role="dialog" id="downloadModal">
			<div class="modal-header"> <a class="close" data-dismiss="modal">×</a>
				<h3>下载</h3>
			</div>
			<div class="modal-body">
				<p>已在下面生成干净的HTML, 可以复制粘贴代码到你的项目.</p>
				<div class="btn-group">
					<button type="button" id="fluidPage" class="active btn btn-info">
						<i class="icon-fullscreen icon-white"></i>
						自适应宽度
					</button>
					<button type="button" class="btn btn-info" id="fixedPage">
						<i class="icon-screenshot icon-white"></i>
						固定宽度
					</button>
				</div>
				<br>
				<br>
				<p>
					<textarea></textarea>
				</p>
			</div>
			<div class="modal-footer"> <a class="btn" data-dismiss="modal">关闭</a> </div>
		</div>
		<div class="modal hide fade" role="dialog" id="shareModal">
			<div class="modal-header"> <a class="close" data-dismiss="modal">×</a>
				<h3>保存</h3>
			</div>
			<div class="modal-body">保存成功</div>
			<div class="modal-footer"> <a class="btn" data-dismiss="modal">Close</a> </div>
		</div>
	</body>
</html>
